function sub_curry(fn){
    var args = [].slice.call(arguments,1)//把add该有的参数拿到
    return function(){
        //newArgs代表的是add该有的参数
        var newArgs=args.concat([].slice.call(arguments))//[...arguments]
        return fn.apply(this,newArgs)
    }
}

function curry(fn,length){
    length = length || fn.length
    var slice =Array.prototype.slice
    
    return function(){
        // if(){

        // }
    }
}
var fn=curry(function add(a,b,c){
    return [a,b,c]
})
fn ('a','b','c')//['a','b','c']
fn ('a','b')('c')//['a','b','c']
fn ('a')('b')('c')//['a','b','c']
fn ('a')('b','c')//['a','b','c']